// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "Data/MissionStruct.h"
#include "OnMissionFinishedWidget.generated.h"


UCLASS()
class MISCELLANEOUSPROJECT_API UOnMissionFinishedWidget : public UUserWidget
{
	GENERATED_BODY()
public:
	virtual void NativeOnInitialized() override;
public:
	UFUNCTION(BlueprintCallable, Category = MissionComponent)
	void DisplayOnMissionFinishedWidget(FMissionMaster CurrentMission,EMissionEnd Result);
	FSlateFontInfo MakeOutlineColor(FSlateFontInfo SlateFontInfo, FLinearColor OutlineColor);
private:
	void FirstDelayLater();
	void SecondDelayLater();
public:
	UPROPERTY(meta = (BindWidget))
		class UBorder* CenterBorder;
	UPROPERTY(meta = (BindWidget))
		class UTextBlock* Secondline;
	UPROPERTY(meta = (BindWidget))
		class UTextBlock* Region;
	UPROPERTY(meta = (BindWidget))
		class UTextBlock* Headline;

	FMissionMaster CurrentMission;
	EMissionEnd Result;

private:
	float DisplayTime;
	FTimerHandle FirstHandle;
	FTimerHandle SecondHandle;
};
